import {getAbout} from '../api/about'

export default {
  namespaced: true, //开启命名空间
  state:{
    loading:false,
    data:""
  },
  mutations:{
    setLoading(state,palyod){
      state.loading = palyod;
    },
    setData(state,palyod){
      state.data = palyod;
    },
  },
  actions:{
    async fetchAbout(ctx){
      ctx.commit("setLoading",true);
      const resp = await getAbout();
      ctx.commit("setData",resp);
      ctx.commit("setLoading",false)
    }
  }
}